package com.hangzhou.xyj.net.request;

import com.hangzhou.xyj.net.request.base.BaseRequest;
import com.hangzhou.xyj.utils.MD5Util;
import com.hangzhou.xyj.utils.constants.API;

/**
 * Created by yaohuix on 2016/2/22  13:24
 * <p/>
 * 说明：重置密码 请求
 */
public class ResetPasswordReq extends BaseRequest {

    /**
     * @param tel          手机号
     * @param password     密码
     * @param smsShortCode 验证码
     * @return
     * @Description
     * @author yaohuix
     * @date 2016/2/22 13:28
     */
    public ResetPasswordReq(String tel, String password, String smsShortCode) {
        setTel(tel);
        setPassword(MD5Util.md5(password));
        setSmsShortCode(smsShortCode);
    }

    public void setTel(String tel) {
        add("tel", tel);
    }

    public void setPassword(String password) {
        add("password", password);
    }

    public void setSmsShortCode(String smsShortCode) {
        add("smsShortCode", smsShortCode);
    }

    @Override
    public String getUrl() {
        return API.RESET_PASSWORD;
    }
}
